package com.isoft.systemprovidor.controller.perinfor;

import com.isoft.systemprovidor.bean.ResponseData;
import com.isoft.systemprovidor.controller.BaseController;

import com.isoft.systemprovidor.entity.perinfor.Perinfor_Relative_Familynember;
import com.isoft.systemprovidor.service.perinfor.Perinfor_Relative_Familynember_Service;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@CrossOrigin
@RestController
@Slf4j
@RequestMapping("/systemprovidor/familynember")
public class Perinfor_Relative_Familynember_Controller extends BaseController {
    @Autowired
    Perinfor_Relative_Familynember_Service service;
    /*查看家庭主要成员信息*/
    @GetMapping("/get")
    public ResponseData selectFamilynember(String sysuserid){
        return service.selectFamilyNember(sysuserid);
    }

    /*修改家庭主要成员信息*/
    @PutMapping("/update")
    public ResponseData<Boolean> changeFamilynember( @RequestBody Perinfor_Relative_Familynember familynember){
        return returnBoolean(service.changeFamilyNember(familynember));
    }
    /*添加家庭主要成员信息*/
    @PostMapping("/add")
    public ResponseData<Object> insertFamilynember(Perinfor_Relative_Familynember familynember){
        return returnObject(service.insertFamilyNember(familynember));
    }
    /*删除家庭主要成员信息(逻辑删除)*/
    @GetMapping("/islock")
    public ResponseData<Boolean> islockFamilynember(Integer id ,String sysuserid){
        return returnBoolean(service.islockFamilyNember(id , sysuserid));
    }
}
